// Title: Tigra Calendar
// URL: http://www.softcomplex.com/products/tigra_calendar/
// Version: 3.3 (European date format)
// Date: 09/01/2005 (mm/dd/yyyy)
// Note: Permission given to use this script in ANY kind of applications if
//    header lines are left unchanged.
// Note: Script consists of two files: calendar?.js and calendar.html

// if two digit year input dates after this year considered 20 century.
var NUM_CENTYEAR = 30;
// is time input control required by default
var BUL_TIMECOMPONENT = false;
// are year scrolling buttons required by default
var IS_TIME_MONTH = true;
// are year display month
var IS_TIME_DAY = true;
// are year display day
var IS_TIME_HOUR = true;
// are year display hour
var IS_TIME_MINUTE = true;
// are year display minute
var IS_TIME_SECOND = true;
// are year display second
// are year scrolling buttons required by default
var BUL_YEARSCROLL = true;
var LANGUAGE="zh";
var calendars = [];
var RE_NUM = /^\-?\d+$/;
var showx=500;
var showy=300;
function calendar(obj_target,path,fun) {

	// assigning methods
	this.gen_date = cal_gen_date1;
	this.gen_time = cal_gen_time1;
	this.gen_tsmp = cal_gen_tsmp1;
	this.prs_date = cal_prs_date1;
	this.prs_time = cal_prs_time1;
	this.prs_tsmp = cal_prs_tsmp1;
	this.popup    = cal_popup1;
	this.path = path;
	this.language= LANGUAGE;
	// validate input parameters
	if (!obj_target)
		return cal_error("Error calling the calendar: no target control specified");
	if (obj_target.value == null)
		return cal_error("Error calling the calendar: parameter specified is not valid target control");
	this.target = obj_target;
	this.fun=function(){
		if(fun && fun!="")
		  eval(fun) ;
	};
	this.time_comp = BUL_TIMECOMPONENT;
	this.year_scroll = BUL_YEARSCROLL;
	// register in global collections
	this.is_time_month = IS_TIME_MONTH;
	this.is_time_day = IS_TIME_DAY;
	this.is_time_hour = IS_TIME_HOUR;
	this.is_time_minute = IS_TIME_MINUTE;
	this.is_time_second = IS_TIME_SECOND;
	this.id = calendars.length;
	calendars[this.id] = this;
}

function cal_popup1 (str_datetime,isScroll) {
	if (str_datetime) {
		this.dt_current = this.prs_tsmp(str_datetime);
	}
	else {
	 var length = this.target.value.length;
	 var tem = this.target.value;
     if(length == 4){
       tem = tem+"-01-01 00:00:00";
	  } else if(length == 7){
       tem = tem+"-01 00:00:00";
      } else if(length == 10){
        tem = tem+" 00:00:00"; 
      } else if(length == 13){
   	    tem = tem+":00:00";     
      } else if(length == 16){
	   tem = tem+":00";
	  }
	   this.dt_current = this.prs_tsmp(tem);
	    //this.dt_current = this.prs_tsmp(this.target.value);
		this.dt_selected = this.dt_current;
	}
	if (!this.dt_current) return;  
	if( !isScroll && navigator.appName == "Microsoft Internet Explorer"){
		showx = event.screenX - event.offsetX - 4 - 190 ;
		showy = event.screenY - event.offsetY + 18;
	}
	//showx = event.screenX - event.offsetX - 4 - 190 ;
	//showy = event.screenY - event.offsetY + 18;
	//showx = 200 ;
	//showy = 500;

	var obj_calwindow = window.open(this.path+'/core/scripts/calendar.html?datetime='
		 + this.dt_current.valueOf()+ '&id=' + this.id,
		'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
		',status=no,resizable=no,top=' + showy + ',left=' + showx + ',dependent=yes,alwaysRaised=yes'
	);
	obj_calwindow.opener = window;
	obj_calwindow.focus();
}

// timestamp generating function,wyx
function cal_gen_tsmp1 (dt_datetime) {
	var stime =  this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime);
     if(this.is_time_month==false){
	      stime = stime.substr(0,4)
	      return(stime);
     }
     if(this.is_time_day==false){
	      stime = stime.substr(0,7)
	      return(stime);
     }
     if(this.is_time_hour==false){
	      stime = stime.substr(0,10)
	      return(stime);
     }
     if(this.is_time_minute==false){
	      stime = stime.substr(0,13)
	      return(stime);
     }
     if(this.is_time_second==false){
	      stime = stime.substr(0,16)
	      return(stime);
     }
          return(stime);
}

// date generating function
function cal_gen_date1 (dt_datetime) {
	if( this.language == "en" ){
		return (
			(dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "/"
			+ (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "/" + dt_datetime.getFullYear()
		); 
	}
	return (
		dt_datetime.getFullYear() +  "-"
		+ (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "-"
		+ (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate()
	);
}
// time generating function
function cal_gen_time1 (dt_datetime) {
	return (
		(dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ":"
		+ (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ":"
		+ (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds())
	);
}

// timestamp parsing function
function cal_prs_tsmp1 (str_datetime) {
	// if no parameter specified return current timestamp
	if (!str_datetime)
		return (new Date());

	// if positive integer treat as milliseconds from epoch
	if (RE_NUM.exec(str_datetime))
		return new Date(str_datetime);
		
	// else treat as date in string format
	var arr_datetime = str_datetime.split(' ');
	return this.prs_time(arr_datetime[1], this.prs_date(arr_datetime[0]));
}

// date parsing function
function cal_prs_date1 (str_date) {
	if( this.language == "en" ){
		var arr_date_temp = str_date.split('/');
		var arr_date = new Array();
		arr_date[0] = arr_date_temp[1];
		arr_date[1] = arr_date_temp[0];
		arr_date[2] = arr_date_temp[2];
		if (arr_date.length != 3) return cal_error ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy.");
		if (!arr_date[0]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found.");
		if (!RE_NUM.exec(arr_date[0])) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers.");
		if (!arr_date[1]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo month value can be found.");
		if (!RE_NUM.exec(arr_date[1])) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers.");
		if (!arr_date[2]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo year value can be found.");
		if (!RE_NUM.exec(arr_date[2])) return cal_error ("Invalid year value: '" + arr_date[2] + "'.\nAllowed values are unsigned integers.");
	
		var dt_date = new Date();
		dt_date.setDate(1);
	
		if (arr_date[1] < 1 || arr_date[1] > 12) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed range is 01-12.");
		dt_date.setMonth(arr_date[1]-1);
		 
		if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
		dt_date.setFullYear(arr_date[2]);
	
		var dt_numdays = new Date(arr_date[2], arr_date[1], 0);
		dt_date.setDate(arr_date[0]);
		if (dt_date.getMonth() != (arr_date[1]-1)) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed range is 01-"+dt_numdays.getDate()+".");
	
		return (dt_date);		
	}
	var arr_date = str_date.split('-');

	if (arr_date.length != 3) return cal_error ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy.");
	var temp = arr_date[0];
	arr_date[0] = arr_date[2];
	arr_date[2] = temp;
	if (!arr_date[0]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found.");
	if (!RE_NUM.exec(arr_date[0])) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers.");
	if (!arr_date[1]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo month value can be found.");
	if (!RE_NUM.exec(arr_date[1])) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers.");
	if (!arr_date[2]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo year value can be found.");
	if (!RE_NUM.exec(arr_date[2])) return cal_error ("Invalid year value: '" + arr_date[2] + "'.\nAllowed values are unsigned integers.");

	var dt_date = new Date();
	dt_date.setDate(1);

	if (arr_date[1] < 1 || arr_date[1] > 12) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed range is 01-12.");
	dt_date.setMonth(arr_date[1]-1);
	 
	if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
	dt_date.setFullYear(arr_date[2]);

	var dt_numdays = new Date(arr_date[2], arr_date[1], 0);
	dt_date.setDate(arr_date[0]);
	if (dt_date.getMonth() != (arr_date[1]-1)) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed range is 01-"+dt_numdays.getDate()+".");

	return (dt_date);
}

// time parsing function
function cal_prs_time1 (str_time, dt_date) {

	if (!dt_date) return null;
	var arr_time = String(str_time ? str_time : '').split(':');

	if (!arr_time[0]) dt_date.setHours(0);
	else if (RE_NUM.exec(arr_time[0]))
		if (arr_time[0] < 24) dt_date.setHours(arr_time[0]);
		else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed range is 00-23.");
	else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed values are unsigned integers.");
	
	if (!arr_time[1]) dt_date.setMinutes(0);
	else if (RE_NUM.exec(arr_time[1]))
		if (arr_time[1] < 60) dt_date.setMinutes(arr_time[1]);
		else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed range is 00-59.");
	else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed values are unsigned integers.");

	if (!arr_time[2]) dt_date.setSeconds(0);
	else if (RE_NUM.exec(arr_time[2]))
		if (arr_time[2] < 60) dt_date.setSeconds(arr_time[2]);
		else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed range is 00-59.");
	else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed values are unsigned integers.");

	dt_date.setMilliseconds(0);
	return dt_date;
}

function cal_error (str_message) {
	alert (str_message);
	return null;
}
function isValidDate(str_date,message,language){
	if( "" == str_date ){
		return true;
	}  
	if( language == "en" ){
		//var re = new RegExp("d(b+)(d)","ig");
		
		var pattern = /^(\d{1,2})\/(\d{1,2})\/((\d{4})|(\d{2}))$/g;
		//var pattern = new RegExp("^(\d{1,2})\/(\d{1,2})\/((\d{4})|(\d{2}))$","g");
	    if(!pattern.test(str_date)){
	        alert(message);
	        return false;
	    }
	    var arrDateTemp = str_date.split("/");  
	    var arrDate = new Array();
	    arrDate[0] = arrDateTemp[2];
	    arrDate[1] = arrDateTemp[0];
	    arrDate[2] = arrDateTemp[1]; 
	    if(parseInt(arrDate[0],10) < 100){
	        arrDate[0] = 2000 + parseInt(arrDate[0],10) + "";
	    }
	    var date =  new Date(arrDate[0],(parseInt(arrDate[1],10) -1)+"",arrDate[2]);
	    if(!(date.getFullYear() == arrDate[0]
	       && date.getMonth() == (parseInt(arrDate[1],10) -1)+""
	       && date.getDate() == arrDate[2])){
	       	alert(message);
	       	return false;
	    }
	    return true;	    
	}else{
	    var pattern = /^((\d{4})|(\d{2}))-(\d{1,2})-(\d{1,2})$/g;
	    if(!pattern.test(str_date)){
	        alert(message);
	        return false;
	    }
	    var arrDate = str_date.split("-");
	    if(parseInt(arrDate[0],10) < 100){
	        arrDate[0] = 2000 + parseInt(arrDate[0],10) + "";
	    }
	    var date =  new Date(arrDate[0],(parseInt(arrDate[1],10) -1)+"",arrDate[2]);
	    if(!(date.getFullYear() == arrDate[0]
	       && date.getMonth() == (parseInt(arrDate[1],10) -1)+""
	       && date.getDate() == arrDate[2])){
	       	alert(message);
	       	return false;
	    }
	    return true;
	}
}
function isValidTimeTag(str,message,length)
{
   var length = document.getElementById(length).value.length;
  // alert(length);
    if(length == 4){
         var   reg   =   /^(\d{1,4})$/;                   
	     var   r   =   str.match(reg); 
	     if(str !='' && r == null){
	      alert(message);
	      return   false; 
	     }    
	     var   d=   new   Date(r[1]);     
	     return   (d.getFullYear()==r[1]);  
	 } else if(length == 7){
         var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})$/;                   
	     var   r   =   str.match(reg); 
	     if(str !='' && r == null){
	      alert(message);
	      return   false; 
	     }    
	     var   d=   new   Date(r[1],   r[3]-1);     
	     return   (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]);  
    } else if(length == 10){
         var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/;                   
	     var   r   =   str.match(reg); 
	     if(str !='' && r == null){
	      alert(message);
	      return   false; 
	     }    
	     var   d=   new   Date(r[1],   r[3]-1,r[4]);     
	     return   (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);  
    } else if(length == 13){
   	     var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2})$/;                   
	     var   r   =   str.match(reg); 
	     if(str !='' && r == null){
	      alert(message);
	      return   false; 
	     }    
	     var   d=   new   Date(r[1],   r[3]-1,r[4],r[5]);     
	     return   (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]);      
    } else if(length == 16){
	     var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2})$/;          
	     var   r   =   str.match(reg); 
	     if(str !='' && r == null){
	      alert(message);
	      return   false; 
	     }    
	     var   d=   new   Date(r[1],   r[3]-1,r[4],r[5],r[6]);     
	     return   (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]);     
    } else {
     var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;        
     var   r   =   str.match(reg); 
     if(str !='' && r == null){
      alert(message);
      return   false; 
     }    
     var   d=   new   Date(r[1],   r[3]-1,r[4],r[5],r[6],r[7]);     
     return   (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]);  
 }
}
function isCheckTime(str,message,type,property)
{
   //alert("end"+document.all(property).value);	
   //var value= document.getElementById(id).value;
  var value = connectTime(type,property,message);
  var str_time = fullTime(value.length,value);
  document.getElementsByName(property)[0].value=getCurrentTime(property);
  return(isValidChineseTime(str_time,message,property));
}
function connectTime(type,property,message){
  value = "";
  if(type == "yearName" && document.all(property+'_yearName').value != ""){
   value = document.all(property+'_yearName').value;
  }
 
  if(type == "monthName" && document.all(property+'_monthName').value != ""){
   if(document.all(property+'_yearName').value == ""){
     alert(message);
     document.all(property+'_monthName').focus();
     return false;
   }
   value = document.all(property+'_yearName').value;
   value = value+"-"+document.all(property+'_monthName').value;
  }
  if(type == "dayName" && document.all(property+'_dayName').value != ""){
    if(document.all(property+'_yearName').value == ""){
     alert(message);
     document.all(property+'_dayName').focus();
     return false;
   }
    if(document.all(property+'_monthName').value == ""){
     alert(message);
     document.all(property+'_dayName').focus();
     return false;
   }
   value = document.all(property+'_yearName').value;
   value = value+"-"+document.all(property+'_monthName').value;
   value = value+"-"+document.all(property+'_dayName').value;
  }
  if(type == "hourName" && document.all(property+'_hourName').value != ""){
   if(document.all(property+'_yearName').value == ""){
     alert(message);
     document.all(property+'_hourName').focus();
     return false;
   }
    if(document.all(property+'_monthName').value == ""){
     alert(message);
     document.all(property+'_hourName').focus();
     return false;
   }
   if(document.all(property+'_dayName').value == ""){
     alert(message);
     document.all(property+'_hourName').focus();
     return false;
   }
   value = document.all(property+'_yearName').value;
   value = value+"-"+document.all(property+'_monthName').value;
   value = value+"-"+document.all(property+'_dayName').value;
   value = value+" "+document.all(property+'_hourName').value;
  }
  if(type == "minuteName" && document.all(property+'_minuteName').value != ""){
   if(document.all(property+'_yearName').value == ""){
     alert(message);
     document.all(property+'_minuteName').focus();
     return false;
   }
    if(document.all(property+'_monthName').value == ""){
     alert(message);
     document.all(property+'_minuteName').focus();
     return false;
   }
   if(document.all(property+'_dayName').value == ""){
     alert(message);
     document.all(property+'_minuteName').focus();
     return false;
   }
   if(document.all(property+'_hourName').value == ""){
     alert(message);
     document.all(property+'_minuteName').focus();
     return false;
   }
   value = document.all(property+'_yearName').value;
   value = value+"-"+document.all(property+'_monthName').value;
   value = value+"-"+document.all(property+'_dayName').value;
   value = value+" "+document.all(property+'_hourName').value;
   value = value+":"+document.all(property+'_minuteName').value;
  }
  if(type == "secondName" && document.all(property+'_secondName').value != ""){
   if(document.all(property+'_yearName').value == ""){
    alert(message);
     document.all('_secondName').focus();
     return false;
   }
    if(document.all(property+'_monthName').value == ""){
     alert(message);
     document.all(property+'_secondName').focus();
     return false;
   }
   if(document.all(property+'_dayName').value == ""){
     alert(message);
     document.all(property+'_secondName').focus();
     return false;
   }
   if(document.all(property+'_hourName').value == ""){
     alert(message);
     document.all(property+'_secondName').focus();
     return false;
   }
   if(document.all(property+'_minuteName').value == ""){
     alert(message);
     document.all(property+'_secondName').focus();
     return false;
   }
   value = document.all(property+'_yearName').value;
   value = value+"-"+document.all(property+'_monthName').value;
   value = value+"-"+document.all(property+'_dayName').value;
   value = value+" "+document.all(property+'_hourName').value;
   value = value+":"+document.all(property+'_minuteName').value;
   value = value+":"+document.all(property+'_secondName').value;
  }
  return value;
}

function fullTime(length,value){
    str_value = "";
    if(length == 4){
         str_value = value+"-01"+"-01"+" 00"+":00"+":00";
	 } else if(length == 7){
         str_value = value+"-01"+" 00"+":00"+":00";
    } else if(length == 10){
         str_value = value+" 00"+":00"+":00";
    } else if(length == 13){
         str_value = value+":00"+":00";
    } else if(length == 16){
	      str_value = value+":00";
    } else {
      str_value = value;
     }    
     return str_value;     
   }
   function isValidChineseTime(str,message,name)
  {
   
                  var   reg   =   /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;                       
                  var   r   =   str.match(reg); 
                  if(str !='' && r == null){
                   alert(message);
                   //document.all(name).focus();
                   return   false; 
                  }    
                  var   d=   new   Date(r[1],   r[3]-1,r[4],r[5],r[6],r[7]);  
                  var flag = d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7];   
                  if(flag != true)
                  {
                  alert(message);
                  }
                  
                  return   flag;     
                
}  
function dateTimeMain(obj,property) {
    //alert("obj.value"+document.all(property).value);
    initTime(document.all(property).value,property);
	//var currentTime = getCurrentTime(property);
	// document.getElementsByName(property)[0].value = "2007-06-15 12:00:09";
	//obj_target.value = this.year+"-"+this.month+"-"+this.day+" "+this.hour+":"+this.minute+":"+this.second;
}
function getCurrentTime(property){
   var temp ="";
    if(document.all(property+'_yearName').value != null && document.all(property+'_yearName').value != ""){
        temp = document.all(property+'_yearName').value;
    if(document.all(property+'_monthName').value != null && document.all(property+'_monthName').value != ""){
        temp =temp +"-"+ document.all(property+'_monthName').value;
    if(document.all(property+'_dayName').value != null && document.all(property+'_dayName').value != ""){
        temp =temp +"-"+document.all(property+'_dayName').value;
    if(document.all(property+'_hourName').value != null && document.all(property+'_hourName').value != ""){
        temp =temp +" "+document.all(property+'_hourName').value;
    if(document.all(property+'_minuteName').value != null && document.all(property+'_minuteName').value != ""){
        temp =temp +":"+document.all(property+'_minuteName').value;
    if(document.all(property+'_secondName').value != null && document.all(property+'_secondName').value != ""){
        temp =temp +":"+document.all(property+'_secondName').value;
    }else{ temp = temp+":00" }
    }else{ temp = temp+":00"+":00" }
    }else{ temp = temp+" 00"+":00"+":00" }
    }else{ temp = temp+"-01"+" 00"+":00"+":00" }
    }else{ temp = temp+"-01"+"-01"+" 00"+":00"+":00" }
   }
   return temp;
}
function initTime(dt_datetime,property) {
    var length = dt_datetime.length;
    var stime;
	//var stime =  this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime);
	if(length>=4){
	 stime = dt_datetime.substr(0,4)
	 if(document.all(property+'_yearName') != null ){
	   document.all(property+'_yearName').value = stime;
	 }
	}
	if(length>=7){
	 stime = dt_datetime.substr(5,2)
	 if(document.all(property+'_monthName') != null ){
	   document.all(property+'_monthName').value = stime;
	 }
	}
	if(length>=10){
	 stime = dt_datetime.substr(8,2)
	 if(document.all(property+'_dayName') != null ){
	   document.all(property+'_dayName').value = stime;
	 }
	}
    if(length>=13){
	 stime = dt_datetime.substr(11,2)
	 if(document.all(property+'_hourName') != null ){
	   document.all(property+'_hourName').value = stime;
	 }
	}
   if(length>=16){
	 stime = dt_datetime.substr(14,2)
	  if(document.all(property+'_minuteName') != null ){
	   document.all(property+'_minuteName').value = stime;
	 }
	}
	if(length>=19){
	 stime = dt_datetime.substr(17,2)
	  if(document.all(property+'_secondName') != null ){
	   document.all(property+'_secondName').value = stime;
	 }
	}
}